<!-- /*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */ -->
<div [dMovable]="false" [handle]="header" [moveEl]="parent"
  [style.height]=" this.roomSetService.joinRoomStatus ? '375px' : '490px'">
  <div class="modal-header" #header>设置</div>
  <div class="modal-body">
    <form dForm [layout]="'horizontal'" [labelSize]="''">
      <d-form-item [style.display]="this.roomSetService.joinRoomStatus ? 'none' : 'inlineblock'">
        <d-form-label>RTC服务器地址</d-form-label>
        <d-form-control>
          <input placeholder="如果你使用的是非1.**.**版本的sdk，则不需要填写此地址" dTextInput autocomplete="off" name="RTCAddress"
            [(ngModel)]="roomSetService.domain" />
        </d-form-control>
      </d-form-item>
      <d-form-item [style.display]="this.roomSetService.joinRoomStatus ? 'none' : 'inlineblock'">
        <d-form-label>appID</d-form-label>
        <d-form-control>
          <input dTextInput autocomplete="off" name="appID" [(ngModel)]="roomSetService.appId" [style.display]="" />
        </d-form-control>
      </d-form-item>
      <d-form-item [style.display]="this.roomSetService.joinRoomStatus ? 'none' : 'inlineblock'">
        <d-form-label>appSecret</d-form-label>
        <d-form-control>
          <input dTextInput autocomplete="off" name="appSecret" [(ngModel)]="roomSetService.appSecret"
            [style.display]="" />
        </d-form-control>
      </d-form-item>
      <d-form-item>
        <d-form-label>音频输出</d-form-label>
        <d-form-control>
          <d-select name="audioOutput" [filterKey]="'label'" [placeholder]="'请选择'"
            [options]="roomSetService.audioOutputs" [(ngModel)]="audioOutputTemp"></d-select>
        </d-form-control>
      </d-form-item>
      <d-form-item>
        <d-form-label>视频输入</d-form-label>
        <d-form-control>
          <d-select name="videoInput" [filterKey]="'label'" [placeholder]="'请选择'" [options]="roomSetService.videoInputs"
            [(ngModel)]="videoInputTemp"></d-select>
        </d-form-control>
      </d-form-item>
      <d-form-item>
        <d-form-label>音频输入</d-form-label>
        <d-form-control>
          <d-select name="audioInput" [filterKey]="'label'" [placeholder]="'请选择'" [options]="roomSetService.audioInputs"
            [(ngModel)]="audioInputTemp"></d-select>
        </d-form-control>
      </d-form-item>
      <d-form-item>
        <d-form-label>视频分辨率</d-form-label>
        <d-form-control>
          <d-select name="videoResolution" [placeholder]="'请选择'" [options]="roomSetService.videoResolutions"
            [(ngModel)]="videoResolutionTemp"></d-select>
        </d-form-control>
      </d-form-item>
      <d-form-item>
        <d-form-label>用户角色</d-form-label>
        <d-form-control>
          <d-select name="joinRole" [placeholder]="'请选择'" [options]="roomSetService.joinRoles"
            [(ngModel)]="joinRoleTemp">
          </d-select>
        </d-form-control>
      </d-form-item>
    </form>
  </div>

  <div class="footer btn-group">
    <div class="btn-group">
      <d-button (btnClick)="confirm($event)" bsStyle="primary" circled="true">确定</d-button>
      <d-button (btnClick)="close($event)" bsStyle="common" circled="true">取消</d-button>
      <d-button (btnClick)="logUpload($event)" bsStyle="primary" circled="true"
        [style.display]="!this.roomSetService.joinRoomStatus ? 'none' : 'inlineblock'">上传日志</d-button>
    </div>
  </div>
  <div class="version">当前sdk版本:{{roomSetService.version}}</div>
</div>